#include <cstdio>
#include <time.h>
#include <windows.h>

using namespace std;
void sleep(clock_t wait);

int main()
{
	int frame_per_sec = 5;
	char tbuff[128]; 

	while(true)
	{
		_strtime_s(tbuff, 128);
		printf("%s\n", tbuff);
		sleep(CLOCKS_PER_SEC/frame_per_sec);

	}

	return 1;
}

void sleep(clock_t wait)
{
	clock_t goal;
	goal = wait + clock();
	while(goal > clock())
		;
}